From 5e31e447e7f5aa33d7ff8859d25008b93de7207e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sun, 21 Jun 2015 22:25:41 +0200 Subject: [PATCH] babl_parse_double: permit 0 and 9 after . spotted by massimo, before this fix BABL_TOLERANCE < 0.1 and != 0 was not possible. --- babl/babl-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babl/babl-internal.h b/babl/babl-internal.h index eb80dd0..ef5411f 100644 --- a/babl/babl-internal.h +++ b/babl/babl-internal.h @@ -305,7 +305,7 @@ static inline double babl_parse_double (const char *str) { char *p = strchr (str, '.') + 1; double d = 10; - for (;*p && *p > '0' && *p < '9';p++, d *= 10) + for (;*p && *p >= '0' && *p <= '9';p++, d *= 10) { if (result >= 0) result += (*p - '0') / d; -- 2.30.2